home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol C-14
/
Vol C-14.iso
/
games
/
peanut.swf
/
scripts
/
frame_40
/
DoAction.as
Wrap
Text File
|
2012-04-23
|
1KB
|
57 lines
rate = int(score / "50");
if(defmove1 == "0" and def1down == "0" and random("60" - rate) == "0")
{
defmove1 = "1";
tellTarget("/defender1")
{
if(eval("../:def1X") < "160")
{
gotoAndStop("right");
play();
}
else if("430" < eval("../:def1X"))
{
gotoAndStop("left");
play();
}
else if(random("2") == "0")
{
gotoAndStop("right");
play();
}
else
{
gotoAndStop("left");
play();
}
}
}
if(defmove2 == "0" and def2down == "0" and random("60" - rate) == "0")
{
defmove2 = "1";
tellTarget("/defender2")
{
if(eval("../:def2X") < "160")
{
gotoAndStop("right");
play();
}
else if("430" < eval("../:def2X"))
{
gotoAndStop("left");
play();
}
else if(random("2") == "0")
{
gotoAndStop("right");
play();
}
else
{
gotoAndStop("left");
play();
}
}
}
prevFrame();